<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .big{
            width: 300px;
            height: 300px;
            background: red;
        }
        .center{
            width: 200px;
            height: 200px;
            background: yellow;
        }
        .small{
            width: 100px;
            height: 100px;
            background: blue;
        }
    </style>
</head>
<body>
    <div class="big">
        <div class="center">
            <div class="small"></div>
        </div>
    </div>
    <ul>
        <li>苹果</li>
        <li>香蕉</li>
        <li>橘子</li>
    </ul>
    <script src="../js/jq.js"></script>
    <script>

    //    事件委托是 父元素代替子元素事件
        $('ul').click((e)=>{
            // console.log('我的big')
            console.log(e.target)
            e.target.remove()
        })
        $('.big').click((e)=>{
            // console.log('我的big')
            console.log(e.target)
            e.target.remove()
        })
        // $('.center').click(()=>{
        //     // console.log('我的center')
        // })
        // $('.small').click((e)=>{
        //     // console.log('我的small')
        //     // console.log(e.target)
        // })

       
    </script>
</body>
</html>